home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / CD32 / CD32-Tools / cdmpeg-110 / doc / cd32mpeg.doc < prev    next >
Encoding:
Text File  |  1994-03-10  |  27.6 KB  |  678 lines

  1. TABLE OF CONTENTS
  2.  
  3. cd32mpeg.device/CMD_FLUSH
  4. cd32mpeg.device/CMD_RESET
  5. cd32mpeg.device/CMD_WRITE
  6. cd32mpeg.device/GetSCR
  7. cd32mpeg.device/MPEGCMD_GETDEVINFO
  8. cd32mpeg.device/MPEGCMD_GETVIDEOPARAMS
  9. cd32mpeg.device/MPEGCMD_PAUSE
  10. cd32mpeg.device/MPEGCMD_PLAY
  11. cd32mpeg.device/MPEGCMD_PLAYLSN
  12. cd32mpeg.device/MPEGCMD_READFRAMEYUV
  13. cd32mpeg.device/MPEGCMD_SEARCH
  14. cd32mpeg.device/MPEGCMD_SEEKLSN
  15. cd32mpeg.device/MPEGCMD_SETAUDIOPARAMS
  16. cd32mpeg.device/MPEGCMD_SETBORDER
  17. cd32mpeg.device/MPEGCMD_SETVIDEOPARAMS
  18. cd32mpeg.device/MPEGCMD_SETWINDOW
  19. cd32mpeg.device/MPEGCMD_SINGLESTEP
  20. cd32mpeg.device/MPEGCMD_SLOWMOTION
  21. cd32mpeg.device/SetSCR
  22. cd32mpeg.device/CMD_FLUSH                           cd32mpeg.device/CMD_FLUSH
  23.  
  24.    NAME
  25.        CMD_FLUSH -- cancel all pending CMD_WRITE requests
  26.  
  27.    FUNCION
  28.        CMD_FLUSH aborts all CMD_WRITE requests in progress or queued.
  29.        This call will also flush any decoder buffers.  However, the current
  30.        play state will not be changed.  For the best visual results, the
  31.     currently executing MPEGCMD_PLAY command should be aborted, or the
  32.     device should be in a paused state.  Otherwise, undesirable video
  33.     or audio artifacts may occur due to decoder underdlow.
  34.  
  35.    INPUTS
  36.        mn_ReplyPort - pointer to message port that receives I/O request
  37.                       if the quick flag (IOF_QUICK) is clear
  38.        io_Device    - pointer to device node, must be set by (or copied from
  39.                       I/O block set by) OpenDevice function
  40.        io_Unit      - unit number to reset
  41.        io_Command   - command number for CMD_FLUSH
  42.        io_Flags     - flags, must be cleared if not use:
  43.                       IOF_QUICK - (CLEAR) reply I/O request
  44.  
  45.    OUTPUTS
  46.        None
  47.  
  48. cd32mpeg.device/CMD_RESET                           cd32mpeg.device/CMD_RESET
  49.  
  50.    NAME
  51.        CMD_RESET -- restore device to a known state
  52.  
  53.    FUNCTION
  54.        CMD_RESET reset the hardware and/or software of the mpeg device
  55.        driver to a known state, cancels all pending I/O requests and resets
  56.        all error conditions.
  57.  
  58.    INPUTS
  59.        mn_ReplyPort - pointer to message port that receives I/O request
  60.                       if the quick flag (IOF_QUICK) is clear
  61.        io_Device    - pointer to device node, must be set by (or copied from
  62.                       I/O block set by) OpenDevice function
  63.        io_Unit      - unit number to reset
  64.        io_Command   - command number for CMD_RESET
  65.        io_Flags     - flags, must be cleared if not use:
  66.                       IOF_QUICK - (CLEAR) reply I/O request
  67.  
  68.    OUTPUTS
  69.        None
  70.  
  71. cd32mpeg.device/CMD_WRITE                           cd32mpeg.device/CMD_WRITE
  72.  
  73.    NAME
  74.        CMD_WRITE -- normal I/O entry point
  75.  
  76.    FUNCTION
  77.        CMD_WRITE is used to send data to the MPEG device driver when playing
  78.        back an MPEG stream using the MPEGCMD_PLAY command.
  79.  
  80.        Depending on the capabilities of the MPEG device driver, the data
  81.        may be packs from an ISO System stream, or may be raw video and/or
  82.        audio streams.
  83.  
  84.     The amount of data the needs to be written to the device depends on
  85.     the playback mode being used.  For normal rate playback, it would be
  86.     a good idea to keep a large amount of data queued up in order to
  87.     avoid video or audio glitches.
  88.  
  89.     When sending MPEG system streams to the device, each block of data
  90.     sent by the CMD_WRITE command MUST correspond to exactly one pack
  91.     of data.
  92.  
  93.    INPUTS
  94.        mn_ReplyPort - pointer to message port that receives I/O request
  95.                       if the quick flag (IOF_QUICK) is clear
  96.        io_Device    - pointer to device node, must be set by (or copied from
  97.                       I/O block set by) OpenDevice function
  98.        io_Unit      - unit number to queue data for
  99.        io_Command   - command number for CMD_WRITE
  100.        io_Flags     - flags, must be cleared if not use:
  101.                       IOF_QUICK - (CLEAR) reply I/O request
  102.        io_Data      - Pointer to a data buffer that contains valid data
  103.     io_Length    - Amount of data pointed to by io_Data.
  104.        iomr_PTSxxxx - A timestamp associated with this data segment.  This
  105.                       is typically the PTS value if this data segment was
  106.                       part of a system stream.
  107.        iomr_MPEGFlags - Status information regarding this data:
  108.                       MPEGFLAGF_VALIDCLK - io_PTSxxxx contains a valid
  109.                                            timestamp associated with
  110.                                            this data.
  111.  
  112.    OUTPUTS
  113.        io_Error     - If non-zero, then an error of some kind occurred.
  114.                       See <exec/errors.h> and <devices/mpeg.h> for more
  115.                       details.
  116.  
  117.    NOTES
  118.        For efficient operation, it will be best to keep a certain minimum
  119.        amount of data queued up at any given time, otherwise gaps or glitches
  120.     may appear in the audio and/or video output.   Approximately 64k for
  121.     video and 16k for audio is a good starting point.
  122.  
  123. cd32mpeg.device/GetSCR                                 cd32mpeg.device/GetSCR
  124.  
  125.    NAME
  126.        GetSCR -- Get the current System Clock Reference value.
  127.  
  128.    SYNOPSIS
  129.        clockValue = GetSCR()
  130.        D0
  131.  
  132.        ULONG GetSCR(struct Unit *unit);
  133.  
  134.    FUNCTION
  135.        This call is used to get the MPEG System Clock Reference from a MPEG
  136.        device driver.  This is usually used for synchronizing one device
  137.        driver to another.
  138.  
  139.    INPUTS
  140.     unit         - The value in the io_Unit field of the IO request
  141.                returned by OpenDevice.
  142.  
  143.    OUTPUTS
  144.        clockValue   - The lower 32 bits of the SCR.  The MPEG clock is
  145.                       specified to be 33 bits, but we only use 32 bits of
  146.                       that clock.
  147.  
  148. cd32mpeg.device/MPEGCMD_GETDEVINFO         cd32mpeg.device/MPEGCMD_GETDEVINFO
  149.  
  150.    NAME
  151.        MPEGCMD_GETDEVINFO -- Determine the capabilities of an MPEG device
  152.  
  153.    FUNCTION
  154.        MPEGCMD_GETDEVINFO is used to determine what types of operations a
  155.        MPEG device is capable of, as well as getting a short description of
  156.        that board.
  157.  
  158.    INPUTS
  159.        mn_ReplyPort - pointer to message port that receives I/O request
  160.                       if the quick flag (IOF_QUICK) is clear
  161.        io_Device    - pointer to device node, must be set by (or copied from
  162.                       I/O block set by) OpenDevice function
  163.        io_Unit      - unit number to begin playback on
  164.        io_Command   - command number for CMD_GETDEVINFO
  165.        io_Flags     - flags, must be cleared if not use:
  166.                       IOF_QUICK - (CLEAR) reply I/O request
  167.        io_Data      - Pointer to a MPEGDevInfo structure to be filled in
  168.                       by the device.
  169.  
  170.    OUTPUTS
  171.        io_Error     - If non-zero, then an error of some kind occured.
  172.                       See <exec/errors.h> and <devices/mpeg.h> for more
  173.                       details.
  174.  
  175.    NOTES
  176.        Best results will be acheived if you queue up some data before
  177.        sending this command.  See cd32mpeg.device/CMD_WRITE for more details.
  178.  
  179. cd32mpeg.device/MPEGCMD_GETVIDEOPARAMS cd32mpeg.device/MPEGCMD_GETVIDEOPARAMS
  180.  
  181.    NAME
  182.        MPEGCMD_GETVIDEOPARAMS -- Get settings for video playback/recording
  183.  
  184.    FUNCTION
  185.        MPEGCMD_GETVIDEOPARAMS may be used to determine what the current
  186.        settings are for playback and/or recording.
  187.  
  188.    INPUTS
  189.        mn_ReplyPort - pointer to message port that receives I/O request
  190.                       if the quick flag (IOF_QUICK) is clear
  191.        io_Device    - pointer to device node, must be set by (or copied from
  192.                       I/O block set by) OpenDevice function
  193.        io_Unit      - unit number to get parameters from
  194.        io_Command   - command number for MPEGCMD_GETVIDEOPARAMS
  195.        io_Flags     - flags, must be cleared if not use:
  196.                       IOF_QUICK - (CLEAR) reply I/O request
  197.        io_Data      - Pointer to a MPEGVideoParams structure.
  198.     io_Length    - Sizeof(struct MPEGVideoParams)
  199.  
  200.    OUTPUTS
  201.        io_Error     - If non-zero, then an error of some kind occured.
  202.                       See <exec/errors.h> and <devices/mpeg.h> for more
  203.                       details.
  204.  
  205. cd32mpeg.device/MPEGCMD_PAUSE                   cd32mpeg.device/MPEGCMD_PAUSE
  206.  
  207.    NAME
  208.        MPEGCMD_PAUSE -- Set the pause mode of the device
  209.  
  210.    FUNCTION
  211.        MPEGCMD_PAUSE is used to temporarily suspend the playback or recording
  212.        process of an MPEG stream, the intention being to resume playback at
  213.        some later time.  All state information as well as any unused buffers
  214.        will be maintained by the device driver.  The last displayed video
  215.     frame will remain on the screen, and any audio output will be
  216.     suspended.
  217.  
  218.     To enable pause, io_Arg1 should be set to a non-zero value.  To
  219.     resume normal/slow motion playback, io_Arg1 should be cleared.
  220.  
  221.    INPUTS
  222.        mn_ReplyPort - pointer to message port that receives I/O request
  223.                       if the quick flag (IOF_QUICK) is clear
  224.        io_Device    - pointer to device node, must be set by (or copied from
  225.                       I/O block set by) OpenDevice function
  226.        io_Unit      - unit number to begin playback on
  227.        io_Command   - command number for MPEGCMD_PLAY
  228.        io_Flags     - flags, must be cleared if not use:
  229.                       IOF_QUICK - (CLEAR) reply I/O request
  230.        iomr_StreamType  - Set to one of MPEGSTREAM_VIDEO, MPEGSTREAM_AUDIO or
  231.                       MPEGSTREAM_SYSTEM depending on the stream type.
  232.  
  233.    OUTPUTS
  234.        io_Error     - If non-zero, then an error of some kind occured.
  235.                       See <exec/errors.h> and <devices/mpeg.h> for more
  236.                       details.
  237.  
  238. cd32mpeg.device/MPEGCMD_PLAY                     cd32mpeg.device/MPEGCMD_PLAY
  239.  
  240.    NAME
  241.        MPEGCMD_PLAY -- Start decoding a MPEG stream
  242.  
  243.    FUNCTION
  244.        MPEGCMD_PLAY tells the MPEG device driver to begin standard rate MPEG
  245.        playback.
  246.  
  247.     The MPEG stream data must be supplied via the CMD_WRITE device
  248.     command.  If you are playing back MPEG from a CD-ROM, you may wish to
  249.     use the MPEGCMD_PLAYLSN command.
  250.  
  251.     This command currently will run forever until it is aborted.  Future
  252.        versions of the device driver may automatically detect the end of an
  253.     MPEG stream.
  254.  
  255.    INPUTS
  256.        mn_ReplyPort - pointer to message port that receives I/O request
  257.                       if the quick flag (IOF_QUICK) is clear
  258.        io_Device    - pointer to device node, must be set by (or copied from
  259.                       I/O block set by) OpenDevice function
  260.        io_Unit      - unit number to begin playback on
  261.        io_Command   - command number for MPEGCMD_PLAY
  262.        io_Flags     - flags, must be cleared if not use:
  263.                       IOF_QUICK - (CLEAR) reply I/O request
  264.        iomr_StreamType  - Set to one of MPEGSTREAM_VIDEO, MPEGSTREAM_AUDIO
  265.                       or MPEGSTREAM_SYSTEM depending on the stream type.
  266.  
  267.    OUTPUTS
  268.        io_Error     - If non-zero, then an error of some kind occured.
  269.                       See <exec/errors.h> and <devices/mpeg.h> for more
  270.                       details.
  271.  
  272.    NOTES
  273.        Best results will be acheived if you queue up some data before
  274.        sending this command.  See cd32mpeg.device/CMD_WRITE for more details.
  275.  
  276. cd32mpeg.device/MPEGCMD_PLAYLSN               cd32mpeg.device/MPEGCMD_PLAYLSN
  277.  
  278.    NAME
  279.        MPEGCMD_PLAYLSN -- Start playing a MPEG stream from CD.
  280.  
  281.    FUNCTION
  282.        MPEGCMD_PLAYLSN tells the MPEG device driver to begin standard rate
  283.        MPEG playback from CD using cd.device.
  284.  
  285.     The command will not return until it has played io_Length number of
  286.     sectors or either "end" of the stream is reached.  Play may also be
  287.     aborted using AbortIO().
  288.  
  289.     Due to the nature of MPEG video, you MUST supply the position of
  290.     the start of the MPEG stream you are playing in iomr_Arg2.  This is
  291.     because the current decoder must read the MPEG Video Sequence
  292.     Header to dertmine parameters such as picture size, frame rate, etc.
  293.     Once this has been done, the device will seek to the position given
  294.     in iomr_Offset.
  295.  
  296.     If the current Scan speed setting is less than zero, then the device
  297.     will start scanning from the end of the sequence once it has located
  298.     the sequence header.
  299.  
  300.    INPUTS
  301.        mn_ReplyPort - pointer to message port that receives I/O request
  302.                       if the quick flag (IOF_QUICK) is clear
  303.        io_Device    - pointer to device node, must be set by (or copied from
  304.                       I/O block set by) OpenDevice function
  305.        io_Unit      - unit number to begin playback on
  306.        io_Command   - command number for MPEGCMD_PLAY
  307.        io_Flags     - flags, must be cleared if not use:
  308.                       IOF_QUICK - (CLEAR) reply I/O request
  309.        iomr_StreamType  - Set to one of MPEGSTREAM_VIDEO, MPEGSTREAM_AUDIO
  310.                       or MPEGSTREAM_SYSTEM depending on the stream type.
  311.     iomr_Data    - unused.
  312.     iomr_Offset  - Logical sector number to start playback at.
  313.     iomr_Length  - Number of sectors to play
  314.     iomr_Arg1    - Sector size to use with cd.device
  315.     iomr_Arg2    - The real beginning of the stream on the disk.
  316.  
  317.    OUTPUTS
  318.        io_Error     - If non-zero, then an error of some kind occured.
  319.                       See <exec/errors.h> and <devices/mpeg.h> for more
  320.                       details.
  321.  
  322. cd32mpeg.device/MPEGCMD_READFRAMEYUV     cd32mpeg.device/MPEGCMD_READFRAMEYUV
  323.  
  324.    NAME
  325.        MPEGCMD_READFRAMEYUV -- Read a single video frame in YUV format
  326.  
  327.    FUNCTION
  328.     MPEGCMD_READFRAMEYUV may be used to read out the currently displayed
  329.     video frame.  The data is supplied in LCrCb format according to MPEG
  330.     specifications.
  331.  
  332.     The io_Data field of the IO request should point to a
  333.     MPEGFrameStore structure filled in as follows:
  334.  
  335.     mfs_Width    - The width of the video stream
  336.     mfs_Height   - The height of the video stream
  337.     mfs_Luma     - Pointer to an array of UBYTE's to store the Luminance
  338.                information for the current frame.  Must be at least
  339.                mfs_Width*mfs_Height bytes in size.
  340.     mfs_Cr         - Pointer to an array of UBYTE's to store the Cr Chroma
  341.                information for the current frame.  Must be at least
  342.                mfs_Width*mfs_Height/4 bytes in size.
  343.     mfs_Cb         - Pointer to an array of UBYTE's to store the Cb Chroma
  344.                       information for the current frame.  Must be at least
  345.                       mfs_Width*mfs_Height/4 bytes in size.
  346.  
  347.     Note that the Cr and Cb components of an MPEG frame have half the
  348.     horizontal and vertical resolution of the Luminance data.
  349.  
  350.    INPUTS
  351.        mn_ReplyPort - pointer to message port that receives I/O request
  352.                       if the quick flag (IOF_QUICK) is clear
  353.        io_Device    - pointer to device node, must be set by (or copied from
  354.                       I/O block set by) OpenDevice function
  355.        io_Unit      - unit number to set parameters for
  356.        io_Command   - command number for MPEGCMD_SETAUDIOPARAMS
  357.        io_Flags     - flags, must be cleared if not use:
  358.                       IOF_QUICK - (CLEAR) reply I/O request
  359.        io_Data      - Pointer to a MPEGFrameStore structure.
  360.     io_Length    - Sizeof(struct MPEGFrameStore)
  361.  
  362.    OUTPUTS
  363.        io_Error     - If non-zero, then an error of some kind occured.
  364.                       See <exec/errors.h> and <devices/mpeg.h> for more
  365.                       details.
  366.  
  367.    NOTES
  368.        Not all devices can support all features listed in the include files,
  369.        so please use the CMD_GETDEVINFO command to determine what the board
  370.        is actually capable of doing.
  371.  
  372. cd32mpeg.device/MPEGCMD_SEARCH                 cd32mpeg.device/MPEGCMD_SEARCH
  373.  
  374.    NAME
  375.        MPEGCMD_SEARCH -- Set forward or reverse search mode and/or search
  376.               for a video I-frame.
  377.  
  378.    FUNCTION
  379.     MPEGCMD_SEARCH is used to either set the forward or reverse search
  380.     mode, or to do a one-shot search for a video I-frame.
  381.  
  382.     The iomr_Arg1 field of the IO request should be set to a non-zero
  383.     value to enable search mode.  If you are playing an MPEG stream
  384.     using the MPEGCMD_PLAYLSN command, iomr_Arg1 should be set to the
  385.     number of sectors to skip after each I-frame is found.  This value
  386.     may be positive or negative.  If you are using the MPEGCMD_PLAY
  387.     command, this value should be a 1.
  388.  
  389.     If you would like the device to search for the next I-frame and then
  390.     enter pause mode, you may set the MPEGF_ONESHOT flag in the
  391.     iomr_MPEGFlags field of the IO request structure.  In this case, the
  392.     IO request will not come back until the frame has been found and the
  393.     device has entered the paused state.
  394.  
  395.    INPUTS
  396.        mn_ReplyPort - pointer to message port that receives I/O request
  397.                       if the quick flag (IOF_QUICK) is clear
  398.        io_Device    - pointer to device node, must be set by (or copied from
  399.                       I/O block set by) OpenDevice function
  400.        io_Unit      - unit number to step
  401.        io_Command   - command number for MPEGCMD_SEARCH
  402.        iomr_StreamType  - Set to MPEGSTREAM_SYSTEM or MPEGSTREAM_VIDEO.
  403.        io_Flags     - flags, must be cleared if not used:
  404.                       IOF_QUICK - (CLEAR) reply I/O request
  405.  
  406.    OUTPUTS
  407.        io_Error     - If non-zero, then an error of some kind occured.
  408.                       See <exec/errors.h> and <devices/mpeg.h> for more
  409.                       details.
  410.  
  411. cd32mpeg.device/MPEGCMD_SEEKLSN               cd32mpeg.device/MPEGCMD_SEEKLSN
  412.  
  413.    NAME
  414.        MPEGCMD_PLAY -- Seek to an arbitrary position with an MPEG stream.
  415.  
  416.    FUNCTION
  417.        MPEGCMD_SEEKLSN tells the MPEG device driver to seek to an arbitrary
  418.     position withing the stream when playing from CD.
  419.  
  420.     This command may only be used while there is a currently executing
  421.     MPEGCMD_PLAYLSN command.  Also, the fields of the IOMPEGReq structure
  422.     must be set up exactly as if you were issuing the MPEGCMD_SEEKLSN
  423.     command.
  424.  
  425.    INPUTS
  426.        mn_ReplyPort - pointer to message port that receives I/O request
  427.                       if the quick flag (IOF_QUICK) is clear
  428.        io_Device    - pointer to device node, must be set by (or copied from
  429.                       I/O block set by) OpenDevice function
  430.        io_Unit      - unit number to begin playback on
  431.        io_Command   - command number for MPEGCMD_PLAY
  432.        io_Flags     - flags, must be cleared if not use:
  433.                       IOF_QUICK - (CLEAR) reply I/O request
  434.        iomr_StreamType  - Set to one of MPEGSTREAM_VIDEO, MPEGSTREAM_AUDIO
  435.                       or MPEGSTREAM_SYSTEM depending on the stream type.
  436.     iomr_Data    - unused.
  437.     iomr_Offset  - Logical sector number to seek to.
  438.     iomr_Length  - Number of sectors to play
  439.     iomr_Arg1    - Sector size to use with cd.device
  440.     iomr_Arg2    - The real beginning of the stream on the disk.
  441.  
  442.    OUTPUTS
  443.        io_Error     - If non-zero, then an error of some kind occured.
  444.                       See <exec/errors.h> and <devices/mpeg.h> for more
  445.                       details.
  446.  
  447. cd32mpeg.device/MPEGCMD_SETAUDIOPARAMS cd32mpeg.device/MPEGCMD_SETAUDIOPARAMS
  448.  
  449.    NAME
  450.        MPEGCMD_SETAUDIOPARAMS -- Set parameters for playback/recording
  451.  
  452.    FUNCTION
  453.        MPEGCMD_SETPARAMS allows you to set such things as DAC attenuation,
  454.        sample rage, target bitrate for decoding, etc.
  455.  
  456.        mn_ReplyPort - pointer to message port that receives I/O request
  457.                       if the quick flag (IOF_QUICK) is clear
  458.        io_Device    - pointer to device node, must be set by (or copied from
  459.                       I/O block set by) OpenDevice function
  460.        io_Unit      - unit number to set parameters for
  461.        io_Command   - command number for MPEGCMD_SETAUDIOPARAMS
  462.        io_Flags     - flags, must be cleared if not use:
  463.                       IOF_QUICK - (CLEAR) reply I/O request
  464.        io_Data      - Pointer to a MPEGAudioParams structure.
  465.     io_Length    - Sizeof(struct MPEGAudioParams)
  466.  
  467.    OUTPUTS
  468.        io_Error     - If non-zero, then an error of some kind occured.
  469.                       See <exec/errors.h> and <devices/mpeg.h> for more
  470.                       details.
  471.  
  472.    NOTES
  473.        Not all devices can support all features listed in the include files,
  474.        so please use the CMD_GETDEVINFO command to determine what the board
  475.        is actually capable of doing.
  476.  
  477. cd32mpeg.device/MPEGCMD_SETBORDER           cd32mpeg.device/MPEGCMD_SETBORDER
  478.  
  479.    NAME
  480.        MPEGCMD_SETBORDER -- Set display position and border color
  481.  
  482.    FUNCTION
  483.        MPEGCMD_SETBORDER is used to set the display position and border color
  484.     for the decoded video stream.
  485.  
  486.     The io_Data field of the IO request must point to a MPEGBorderParams
  487.     structure.   That structure should be set up as follows:
  488.  
  489.     mbp_LeftBorder  - Offset from left of display (Hi-Res pixels)
  490.     mbp_TopBorder    - Offset from top of display  (NI scanlines)
  491.     mbp_BorderRed    - 8-bit red value for the border color
  492.     mbp_BorderGreen - 8-bit green value for the border color
  493.     mbp_BorderBlue  - 8-bit blue value for the border color
  494.  
  495.     Values of 0 for mbp_LeftBorder and/or mbp_TopBorder mean that the
  496.     video should be centered horizontally and/or vertically centered
  497.     on the display.
  498.  
  499.    INPUTS
  500.        mn_ReplyPort - pointer to message port that receives I/O request
  501.                       if the quick flag (IOF_QUICK) is clear
  502.        io_Device    - pointer to device node, must be set by (or copied from
  503.                       I/O block set by) OpenDevice function
  504.        io_Unit      - unit number to step
  505.        io_Command   - command number for MPEGCMD_SETBORDER
  506.     io_Data         - pointer to a MPEGBorderParams structure.
  507.     io_Length    - sizeof(struct MPEGWindowParams)
  508.        io_Flags     - flags, must be cleared if not used:
  509.                       IOF_QUICK - (CLEAR) reply I/O request
  510.  
  511.    OUTPUTS
  512.        io_Error     - If non-zero, then an error of some kind occured.
  513.                       See <exec/errors.h> and <devices/mpeg.h> for more
  514.                       details.
  515.  
  516. cd32mpeg.device/MPEGCMD_SETVIDEOPARAMS cd32mpeg.device/MPEGCMD_SETVIDEOPARAMS
  517.  
  518.    NAME
  519.        MPEGCMD_SETVIDEOPARAMS -- Set parameters for playback/recording
  520.  
  521.    FUNCTION
  522.        MPEGCMD_SETVIDEOPARAMS allows you to set such things as picture size,
  523.     display type (NTSC/PAL), etc.
  524.  
  525.        mn_ReplyPort - pointer to message port that receives I/O request
  526.                       if the quick flag (IOF_QUICK) is clear
  527.        io_Device    - pointer to device node, must be set by (or copied from
  528.                       I/O block set by) OpenDevice function
  529.        io_Unit      - unit number to set parameters for
  530.        io_Command   - command number for MPEGCMD_SETVIDEOPARAMS
  531.        io_Flags     - flags, must be cleared if not use:
  532.                       IOF_QUICK - (CLEAR) reply I/O request
  533.        io_Data      - Pointer to a MPEGVideoParams structure.
  534.     io_Length    - Sizeof(struct MPEGVideoParams)
  535.  
  536.    OUTPUTS
  537.        io_Error     - If non-zero, then an error of some kind occured.
  538.                       See <exec/errors.h> and <devices/mpeg.h> for more
  539.                       details.
  540.  
  541.    NOTES
  542.        Not all devices can support all features listed in the include files,
  543.        so please use the MPEGCMD_GETDEVINFO command to determine what the
  544.        device is actually capable of doing.
  545.  
  546.     The mvp_DisplayType parameter will be ignored during normal playback.
  547.     If you need to explicitly set what type of screen the MPEG will be
  548.     displayed on, you must set it before playback begins.
  549.  
  550. cd32mpeg.device/MPEGCMD_SETWINDOW           cd32mpeg.device/MPEGCMD_SETWINDOW
  551.  
  552.    NAME
  553.        MPEGCMD_SETWINDOW -- Set portion of MPEG video to display
  554.  
  555.    FUNCTION
  556.        MPEGCMD_SETWINDOW is used to set the portion of a MPEG video stream
  557.     that will be displayed.  The io_Data parameter must point to a
  558.     MPEGWindowParams structure that contains offset/size information.
  559.  
  560.     The fields in the MPEGWindowParams structure are used as follows:
  561.  
  562.     mwp_XOffset - X Offset into the decoded picture for display start
  563.     mwp_YOffset - Y Offset into the decoded picture for display start
  564.     mwp_Width - How wide the displayed portion should be
  565.     mwp_Height - How high the displayed portion should be
  566.  
  567.     mwp_XOffset and mwp_Width are specified in Amiga Hi-Res pixels.
  568.     mwp_YOffset and mwp_Height are specified in non-interlaced scan
  569.     lines.
  570.  
  571.     Note: The CL450 is limited to positioning the decode window on
  572.     lo-res pixel boundaries, so mwp_XOffset will be scaled down by
  573.     two.
  574.  
  575.    INPUTS
  576.        mn_ReplyPort - pointer to message port that receives I/O request
  577.                       if the quick flag (IOF_QUICK) is clear
  578.        io_Device    - pointer to device node, must be set by (or copied from
  579.                       I/O block set by) OpenDevice function
  580.        io_Unit      - unit number to step
  581.        io_Command   - command number for MPEGCMD_SETWINDOW
  582.     io_Data         - pointer to a MPEGWindowParams structure.
  583.     io_Length    - sizeof(struct MPEGWindowParams)
  584.        io_Flags     - flags, must be cleared if not used:
  585.                       IOF_QUICK - (CLEAR) reply I/O request
  586.  
  587.    OUTPUTS
  588.        io_Error     - If non-zero, then an error of some kind occured.
  589.                       See <exec/errors.h> and <devices/mpeg.h> for more
  590.                       details.
  591.  
  592. cd32mpeg.device/MPEGCMD_SINGLESTEP         cd32mpeg.device/MPEGCMD_SINGLESTEP
  593.  
  594.    NAME
  595.        MPEGCMD_STEP -- Step one video frame
  596.  
  597.    FUNCTION
  598.        MPEGCMD_STEP may be used with mpeg device drivers that support it to
  599.        single step through successive frames of an MPEG movie.  This command
  600.        will cause the device to enable pause mode if it wasn't already.
  601.  
  602.    INPUTS
  603.        mn_ReplyPort - pointer to message port that receives I/O request
  604.                       if the quick flag (IOF_QUICK) is clear
  605.        io_Device    - pointer to device node, must be set by (or copied from
  606.                       I/O block set by) OpenDevice function
  607.        io_Unit      - unit number to step
  608.        io_Command   - command number for CMD_STEP
  609.        io_Flags     - flags, must be cleared if not use:
  610.                       IOF_QUICK - (CLEAR) reply I/O request
  611.  
  612.    OUTPUTS
  613.        io_Error     - If non-zero, then an error of some kind occured.
  614.                       See <exec/errors.h> and <devices/mpeg.h> for more
  615.                       details.
  616.  
  617. cd32mpeg.device/MPEGCMD_SLOWMOTION         cd32mpeg.device/MPEGCMD_SLOWMOTION
  618.  
  619.    NAME
  620.        MPEGCMD_SLOWMOTION -- Set slow motion playback mode.
  621.  
  622.    FUNCTION
  623.     MPEGCMD_SLOWMOTION is used to set or clear slow motion playbakc.
  624.  
  625.     For this command, iomr_Arg1 is used to set the slow-motion frame
  626.     rate.  The display framerate will be equal to (stream frame rate/
  627.     iomr_Arg1).  So a value of 2 would play the stream at half speed,
  628.     4 would be quarter speed, etc.  A value of 0 will clear the slow
  629.     motion mode.  A value of 1 will cause video to play at the normal
  630.     rate, but no audio decoding will occur.
  631.  
  632.    INPUTS
  633.        mn_ReplyPort - pointer to message port that receives I/O request
  634.                       if the quick flag (IOF_QUICK) is clear
  635.        io_Device    - pointer to device node, must be set by (or copied
  636.                       from I/O block set by) OpenDevice function
  637.        io_Unit      - unit number to step
  638.        io_Command   - command number for MPEGCMD_SLOWMOTION
  639.     iomr_Arg1    - see above.
  640.        io_Flags     - flags, must be cleared if not used:
  641.                       IOF_QUICK - (CLEAR) reply I/O request
  642.  
  643.    OUTPUTS
  644.        io_Error     - If non-zero, then an error of some kind occured.
  645.                       See <exec/errors.h> and <devices/mpeg.h> for more
  646.                       details.
  647.  
  648. cd32mpeg.device/SetSCR                                 cd32mpeg.device/SetSCR
  649.  
  650.    NAME
  651.        SetSCR -- Set the current time
  652.  
  653.    SYNOPSIS
  654.        success = SetSCR(unitPtr, clockValue)
  655.        D0               D0
  656.  
  657.        BOOL SetSCR(struct Unit *unit, ULONG clockValue);
  658.  
  659.    FUNCTION
  660.        This call is used to set the MPEG System Clock Reference for a MPEG
  661.        device driver.  This is usually used for synchronizing one device
  662.        driver to another.
  663.  
  664.    INPUTS
  665.     unit         - The value in the io_Unit field of the IO request
  666.                returned by OpenDevice().
  667.        clockValue   - The lower 32 bits of the SCR.  The MPEG clock is
  668.                       specified to be 33 bits, but we only use 32 bits of
  669.                       that clock.
  670.  
  671.    OUTPUTS
  672.     success         - Whether or not the clock was set.
  673.  
  674.    BUGS
  675.     The current hardware has a limitation in that you can only use
  676.     this function to synchronize a raw video stream to another source.
  677.  
  678.